package com.ruoyi.yipaiju;

import com.ruoyi.yipaiju.service.IForeclosedHouseService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

@Component("yipaijuTask")
public class YipaijuTask {

    @Autowired
    private IForeclosedHouseService foreclosedHouseService;

    /**
     * 房源城市坐标数据
     */
    public void reflushForeclosedHousePosition(){
        foreclosedHouseService.reflushForeclosedHousePosition();
    }

    /**
     * 整理爬虫错误数据
     */
    public void cleanForeclosedHouseData(){
        foreclosedHouseService.cleanForeclosedHouseData();
    }

    /**
     * 时间数据处理
     */
    public void timeHandlerForeclosedHouseData(){
        foreclosedHouseService.timeHandlerForeclosedHouseData();
    }

    /**
     * 清面积数据
     */
    public void cleanForeclosedHouseAreaData(String origin){
        foreclosedHouseService.cleanForeclosedHouseAreaData(origin);
    }

    /**
     * 发送通知消息
     */
    public void sendSubscribeNotice(){
        foreclosedHouseService.sendSubscribeNotice();
    }

    /**
     * 房源状态数据修改， 因为爬虫不及时 这里使用任务批量操作  批量修改为进行中
     */
    public void cleanForeclosedHouseStatus(){
        foreclosedHouseService.cleanForeclosedHouseStatus();
    }

    /**
     * 房源状态数据修改， 把已经结束的房源重新再爬一遍更新状态
     */
    public void cleanForeclosedHouseStatus1(Long serverId){
        foreclosedHouseService.cleanForeclosedHouseStatus1(serverId);
    }


}
